genericMotor README
8 - AUG - 2014
Kjk

The purpose of the genericMotor CLASS is to implement motor specific functionality.

These specific commands were gathered from the command drive, and its motor-specific support, drive_motor.vi.

get_motor_position() 
	OUT: 
	actualPosition:double[0]

get_motor_status() 
	OUT: 
	status:int[0]

reference_position(
    iN: position:float[0]) 
	OUT: 
	PositionName:str[0]

get_controller_index()
	OUT: 
	ControllerIdx : Int[0]

start_motor( 
    IN: HW_angle:float[0])

check_tolerance( 
    IN: HW_angle:float[0] ) 
	OUT: 
	difference:Float[0]

run_program( 
    IN: PgmNumber:int[0], 
	pgmName:str[0]) 



The idea is that the class, genericMotor will derive from genericDevice.  It will use the same command core to dispatch methods for each motor's implementation.  

[ ]  Why not have the genericDevice derive from an abstract base class that implements the core functionality of the SPICE interface:
plugIn_Base:
	configuration variable 
	VI interface ins/outs with error handling
	command functionality (core, pre-, post-)
genericDevice extends plugIn_Base 
	adds device parameters (name, alias, description, class, type, ...); 
	command methods used by device framework
genericMotor extends genericDevice
	adds motor parameters (speed, motor , ...)
	command methods used by drive_motor

on the SPICE side, 
	motor adapter stores an object of type generic motor.

on the plug-IN side,
	motor axis implements the functionality described by generic motor